1. Field of the Invention
The present invention relates to interface circuits provided with functions for dealing with contact inputs and input signals such as logic.
2. Description of the Related Art
There are two methods for inputting input signals to the terminals of control devices composed of microcomputers; these are sink input and source input. In Japan, control devices are mostly of sink input type but overseas, and particularly in Europe, the majority are of source input type. Therefore, makers who produce this type of control equipment have been producing respective control devices for sink input and control devices for source input, and shipping them according to the users' demands. As against this, the makers have recently been trying to reduce the number of types of production machine. For this reason they have been trying to produce control devices composed to be capable of using either of the above two input methods (shared use).
An example of a control device of a composition capable of shared use of the above two input methods is shown in FIG. 1. This FIG. 1 is an electrical circuit diagram showing the input circuit part of the control device. As shown in FIG. 1, four diodes 2, 3, 4 and 5, resistor 6 and photodiode 7a of photocoupler 7 are connected to input terminal 1. Photodetector 7b of photocoupler 7 is connected between a, for example, 5V DC voltage terminal Vp5 and earth. Moreover, the junction point between photodectector 7b and DC voltage terminal Vp5 is connected to input terminal 8a of microcomputer 8.
Contacts 10a and 10b, which may be closed by jumper line 9, are provided between the anode of diode 2 of diodes 2, 3, 4, 5 and a, for example, 24V DC voltage terminal Vp. Also, contacts 12a and 12b, which may be closed by jumper line 11, are provided between the cathode of diode 5 of diodes 2, 3, 4, 5 and earth.
In the above composition, in the case of allowing sink input to be inputted at input terminal 1, contacts 10a and 10b are closed by soldering jumper line 9 between them, and contacts SA for sink input are connected between input terminal 1 and common earth terminal 13. On the other hand, in the case of allowing source input to be inputted at terminal 1, contacts 12a and 12b are closed by soldering jumper line 11 between them, and contacts SB for source input are connected between a, for example, 24V DC input terminal Vi and input terminal 1. By this means the above input circuit has a shared use composition for the two input methods.
However, with the above prior art composition, four diodes 2.about.5 and photocoupler 7 must be added for one input terminal 1. This has the disadvantage of increasing production costs. In particular, many control devices are normally provided with about 10.about.100 input terminals. In such cases there was a risk that as many circuit compositions made up of diodes 2.about.5 and photocouplers 7 as there were input terminals would have to be provided, and the production costs would increase considerably.